<!-- Name Form Input -->
<div class="form-group @if ($errors->has('name')) has-error @endif">
    {!! Form::label('name', '角色名') !!}
    {!! Form::text('name', null, ['class' => 'form-control', 'placeholder' => '角色名']) !!}
    @if ($errors->has('name')) <p class="help-block">{{ $errors->first('name') }}</p> @endif
</div>
<div class="form-group @if ($errors->has('description')) has-error @endif">
    {!! Form::label('description', '角色描述') !!}
    {!! Form::text('description', null, ['class' => 'form-control', 'placeholder' => '角色描述']) !!}
    @if ($errors->has('description')) <p class="help-block">{{ $errors->first('description') }}</p> @endif
</div>
<div class="form-group">
<?php $index = 1; ?>
<?php foreach ($permissions as $k => $permission){ ?>
    <?php if($index > 10) { echo '<br/>'; $index = 1; }?>
    <input type="checkbox" name="permissions[]"
           value="{{ $permission->name }}" <?php if(in_array($permission->name, $pn)) echo 'checked'; ?> />
    {{ $permission->name }} &nbsp;&nbsp;&nbsp;&nbsp;
    <?php $index++; ?>
<?php } ?>
</div>
